import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import antd from 'ant-design-vue/'
import 'ant-design-vue/dist/antd.css'
import * as Icons from '@ant-design/icons-vue'
import axios from 'axios'

axios.defaults.baseURL = process.env.VUE_APP_SERVER

// axios 拦截器
axios.interceptors.request.use(function(config){
    console.log("请求参数",config)
    return config;
}, 
    error=>{
        return Promise.reject(error);
});

axios.interceptors.response.use(function(resp){
    console.log('响应结果',resp)
    return resp;},
    error=>{
        return Promise.reject(error);
});


const app = createApp(App);
app.use(store).use(router).use(antd).mount('#app')

const icons: any = Icons;
for(const i in icons){
    app.component(i,icons[i]);
}
